package com.smart.manager.product.entities.views;

import com.smart.common.entities.core.BaseView;
import io.ebean.annotation.DbArray;
import io.ebean.annotation.View;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;


/**
 * 游戏管理 套餐资料
 * @author leo
 * @date 2023/09/07
 */
@Data
@Entity
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@View(name = "product_props_combo")
public class PropsComboView extends BaseView {

    /**
     * 套餐代码
     */
    @Id
    @NotBlank(message = "套餐代码 不能为空")
    @Length(max = 30, message = "套餐代码 不能超过30个字符")
    @ApiModelProperty("套餐代码")
    private String code;
    
    @ApiModelProperty("套餐名称")
    private String name;

    @ApiModelProperty("售价金币")
    private Integer price;

    @ApiModelProperty("档案图标")
    private String icon;

    @ApiModelProperty("最低食用等级")
    private Integer minLevel;

    @ApiModelProperty("是否是套餐包")
    private Boolean isPack;

    @ApiModelProperty("有机属性")
    private Boolean isOrganic;

    @ApiModelProperty("折扣")
    private BigDecimal discountPrice;

    @ApiModelProperty("最高食用等级")
    private Integer maxLevel;

    @ApiModelProperty("食物档案code")
    @DbArray
    private List<String> meat;

    @ApiModelProperty("配比重量(克)")
    private String weight;

}